
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 03/29/2011 15:29:31
-- Generated from EDMX file: D:\@yuxinyang\v3\YiDeSoft\BigTrunk\EzDesk-Dev\Services\Apps\EzDesk.Apps.Data\Project\EzDeskProject.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [EzDeskProject];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------


-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[WorkitemSet]', 'U') IS NOT NULL
    DROP TABLE [dbo].[WorkitemSet];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'WorkitemSet'
CREATE TABLE [dbo].[WorkitemSet] (
    [Id] uniqueidentifier  NOT NULL,
    [OwnerId] uniqueidentifier  NOT NULL,
    [CreatorId] uniqueidentifier  NOT NULL,
    [CreateOn] datetime  NOT NULL,
    [Title] nvarchar(max)  NOT NULL,
    [Description] nvarchar(max)  NULL,
    [IsFinished] bit  NOT NULL,
    [FinishOn] datetime  NULL,
    [Points] int  NOT NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [Id] in table 'WorkitemSet'
ALTER TABLE [dbo].[WorkitemSet]
ADD CONSTRAINT [PK_WorkitemSet]
    PRIMARY KEY CLUSTERED ([Id] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------